function DateToTimesharp(date){
    var times_str = date.replace(/:/g,'-');
    var new_str = times_str.replace(/ /g,'-');	
    var arr = new_str.split("-");
    var datum = new Date(Date.UTC(arr[0],arr[1]-1,arr[2],arr[3]-8,arr[4]));
    var timeint=datum.getTime()/1000;
    var aa = new Date(datum.getTime());
	setClipboard(timeint.toString());
}
function getClipboard() 
{
    if (window.clipboardData) 
    {
        return (window.clipboardData.getData('text'));
    } 
    else 
    {
        if (window.netscape) 
        {
            try 
            {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                var clip = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
                if (!clip) 
                {
                    return;
                }
                var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
                if (!trans) 
                {
                    return;
                }
                trans.addDataFlavor("text/unicode");
                clip.getData(trans, clip.kGlobalClipboard);
                var str = new Object();
                var len = new Object();
                trans.getTransferData("text/unicode", str, len);
            }
            catch (e) 
            {
                alert("您的firefox安全限制限制您进行剪贴板操作，请打开'about:config'将 signed.applets.codebase_principal_support'设置为true'之后重试，相对路径为firefox根目录 /greprefs/all.js");
                return null;
            }
            if (str) 
            {
                if (Components.interfaces.nsISupportsWString) 
                {
                    str = str.value.QueryInterface(Components.interfaces.nsISupportsWString);
                } 
                else 
                {
                    if (Components.interfaces.nsISupportsString) 
                    {
                        str = str.value.QueryInterface(Components.interfaces.nsISupportsString);
                    } 
                    else 
                    {
                        str = null;
                    }
                }
            }
            if (str) 
            {
                return (str.data.substring(0, len.value / 2));
            }
        }
    }
    return null;
}
function setClipboard(maintext) 
{
    if (window.clipboardData) 
    {
        return (window.clipboardData.setData("Text", maintext));
    } 
    else 
    {
        if (window.netscape) 
        {
            try{
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            var clip = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
            if (!clip) 
            {
                return;
            }
            var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
            if (!trans) 
            {
                return;
            }
            trans.addDataFlavor("text/unicode");
            var str = new Object();
            var len = new Object();
            var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
            var copytext = maintext;
            str.data = copytext;
            trans.setTransferData("text/unicode", str, copytext.length * 2);
            var clipid = Components.interfaces.nsIClipboard;
            if (!clip) 
            {
                return false;
            }
            clip.setData(trans, null, clipid.kGlobalClipboard);
            return true;
            }
            catch(e)
            {
                alert("您的firefox安全限制限制您进行剪贴板操作，请打开'about:config'将 signed.applets.codebase_principal_support'设置为true'之后重试，相对路径为firefox根目录 /greprefs/all.js");
                return false;
            }
        }
    }
    return false;
}